package com.whu.MenuHub.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.whu.MenuHub.domain.FoodComment;
import com.whu.MenuHub.domain.FoodCommentDTO;
import com.whu.MenuHub.domain.LabelNum;
import com.whu.MenuHub.exception.MenuHubException;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.One;

import java.util.List;
import java.util.Map;

public interface FoodCommentService extends IService<FoodComment> {
    public void updateJudgementByID(FoodComment foodJudgement) throws MenuHubException;
    public void deleteJudgementById(Integer id) throws MenuHubException;
    public FoodComment insertFoodJudgement(FoodComment foodJudgement) throws MenuHubException;
    public FoodComment getJudgementByID(Integer id);

    public IPage<FoodCommentDTO> getComments(Map<String, Object> condition, Integer pageNum, Integer pageSize);

    public List<FoodComment> getAllCommentsByUserAndFood(Integer userID, Integer foodID);
    public List<FoodComment> getAllCommentsByFood(Integer foodID);
    List<Float> getFoodAveScoreByAddress(String address);
    List<Float> getFoodAveScoreByGender(String gender);

    List<LabelNum> getlabelNumByUserOrder(Integer userID);

}
